From 278916fbd081e3b0f3a7e44477a25e38e8c309de Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Mon, 15 Sep 2014 15:04:58 +0000 Subject: [PATCH] for cross compiles use cross versions of lupdate, lrelease if found. --- gpsbabel/configure | 140 ++++++++++++++++++++++++++++++++++++++---- gpsbabel/configure.in | 4 +- 2 files changed, 131 insertions(+), 13 deletions(-) diff --git a/gpsbabel/configure b/gpsbabel/configure index 5fb809ff5..1362165fe 100755 --- a/gpsbabel/configure +++ b/gpsbabel/configure @@ -637,7 +637,9 @@ OSJEEPS USB_CFLAGS USB_LIBS LIBUSBCONFIG +ac_ct_LRELEASE LRELEASE +ac_ct_LUPDATE LUPDATE ac_ct_QMAKE QMAKE @@ -4538,10 +4540,11 @@ esac fi fi -for ac_prog in lupdate-qt5 lupdate-qt4 lupdate -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 +if test -n "$ac_tool_prefix"; then + for ac_prog in lupdate-qt5 lupdate-qt4 lupdate + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LUPDATE+:} false; then : @@ -4557,7 +4560,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LUPDATE="$ac_prog" + ac_cv_prog_LUPDATE="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4577,15 +4580,73 @@ $as_echo "no" >&6; } fi - test -n "$LUPDATE" && break -done - -for ac_prog in lrelease-qt5 lrelease-qt4 lrelease + test -n "$LUPDATE" && break + done +fi +if test -z "$LUPDATE"; then + ac_ct_LUPDATE=$LUPDATE + for ac_prog in lupdate-qt5 lupdate-qt4 lupdate do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LUPDATE+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LUPDATE"; then + ac_cv_prog_ac_ct_LUPDATE="$ac_ct_LUPDATE" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LUPDATE="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LUPDATE=$ac_cv_prog_ac_ct_LUPDATE +if test -n "$ac_ct_LUPDATE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LUPDATE" >&5 +$as_echo "$ac_ct_LUPDATE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_LUPDATE" && break +done + + if test "x$ac_ct_LUPDATE" = x; then + LUPDATE="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LUPDATE=$ac_ct_LUPDATE + fi +fi + +if test -n "$ac_tool_prefix"; then + for ac_prog in lrelease-qt5 lrelease-qt4 lrelease + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LRELEASE+:} false; then : $as_echo_n "(cached) " >&6 else @@ -4599,7 +4660,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_LRELEASE="$ac_prog" + ac_cv_prog_LRELEASE="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -4619,9 +4680,66 @@ $as_echo "no" >&6; } fi - test -n "$LRELEASE" && break + test -n "$LRELEASE" && break + done +fi +if test -z "$LRELEASE"; then + ac_ct_LRELEASE=$LRELEASE + for ac_prog in lrelease-qt5 lrelease-qt4 lrelease +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_LRELEASE+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_LRELEASE"; then + ac_cv_prog_ac_ct_LRELEASE="$ac_ct_LRELEASE" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_LRELEASE="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_LRELEASE=$ac_cv_prog_ac_ct_LRELEASE +if test -n "$ac_ct_LRELEASE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LRELEASE" >&5 +$as_echo "$ac_ct_LRELEASE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_LRELEASE" && break done + if test "x$ac_ct_LRELEASE" = x; then + LRELEASE="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + LRELEASE=$ac_ct_LRELEASE + fi +fi + if test "$QMAKE" = no ; then as_fn_error $? "Qt4 or Qt5 is required, but neither was found" "$LINENO" 5; diff --git a/gpsbabel/configure.in b/gpsbabel/configure.in index 5ad34d1c2..1a7da97b0 100644 --- a/gpsbabel/configure.in +++ b/gpsbabel/configure.in @@ -158,8 +158,8 @@ AC_SUBST(RC) # If qmake-qt4 isn't found look for the standard name qmake and assume it is # from a useful version Qt. AC_CHECK_TOOLS(QMAKE, [qmake-qt5 qmake-qt4 qmake], "no") -AC_CHECK_PROGS(LUPDATE, [lupdate-qt5 lupdate-qt4 lupdate]) -AC_CHECK_PROGS(LRELEASE, [lrelease-qt5 lrelease-qt4 lrelease]) +AC_CHECK_TOOLS(LUPDATE, [lupdate-qt5 lupdate-qt4 lupdate]) +AC_CHECK_TOOLS(LRELEASE, [lrelease-qt5 lrelease-qt4 lrelease]) if test "$QMAKE" = no ; then AC_MSG_ERROR([Qt4 or Qt5 is required, but neither was found]); -- 2.30.2